package com.episode.duetapi.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class TimeUtil {


    private static Date date = new Date();


    public static String getoId() {
        return String.valueOf(new Date().getTime());
    }

    public static long getTime() {
        return new Date().getTime();
    }
    
    public static long getDateTime() {
    	SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
    	String time = df.format(new Date());
		try {
			Date date = df.parse(time);
			long ts = date.getTime() / 1000;
	        return ts;
		} catch (ParseException e) {		
			e.printStackTrace();
		}
		return 0;
    }

}
